import request from '@/utils/request'

// 查询推送通道配置列表
export function listPushconfig(query) {
  return request({
    url: '/operate/pushconfig/list',
    method: 'get',
    params: query
  })
}

export function listPushconfigGroup(query) {
  return request({
    url: '/operate/pushconfig/getPushConfigListGroup',
    method: 'get',
    params: query
  })
}

// 查询推送通道配置详细
export function getPushconfig(id) {
  return request({
    url: '/operate/pushconfig/' + id,
    method: 'get'
  })
}

// 新增推送通道配置
export function addPushconfig(data) {
  return request({
    url: '/operate/pushconfig',
    method: 'post',
    data: data
  })
}

// 修改推送通道配置
export function updatePushconfig(data) {
  return request({
    url: '/operate/pushconfig',
    method: 'put',
    data: data
  })
}

// 删除推送通道配置
export function delPushconfig(id) {
  return request({
    url: '/operate/pushconfig/' + id,
    method: 'delete'
  })
}

// 导出推送通道配置
export function exportPushconfig(query) {
  return request({
    url: '/operate/pushconfig/export',
    method: 'get',
    params: query
  })
}


export function testPushSend(data) {
  return request({
    url: '/operate/pushconfig/testSend',
    method: 'post',
    data: data
  })
}
